<title>邮箱配置</title>
<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>设置</cite></a>
        <a><cite>邮箱配置</cite></a>
    </div>
</div>
<div class="layui-col-xs12 layui-col-sm8 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset2">
    <div class="layui-field-box">
        <div class="layui-card">
            <div class="layui-card-header">邮箱配置</div>
            <div class="layui-card-body">
                <form class="layui-form layui-form-pane" action="" lay-filter="mail">
                    <div class="layui-form-item"><label class="layui-form-label" style="width: 130px !important;
                        text-align: center !important;">SMTP服务器</label>
                        <div class="layui-input-block" style="margin-left: 130px !important;"><input type="text"
                                name="server" lay-verify="required" lay-reqText="SMTP服务器名称不能为空！"
                                placeholder="如：smtp.xx.xxx" autocomplete="off" lay-verType="tips" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item"><label class="layui-form-label">SMTP端口</label>
                        <div class="layui-input-block"><input type="number" name="port" lay-verify="required"
                                lay-reqText="端口不能为空！" placeholder="25、465等" autocomplete="off" lay-verType="tips"
                                class="layui-input"></div>
                    </div>
                    <div class="layui-form-item"><label class="layui-form-label">邮箱账户</label>
                        <div class="layui-input-block"><input type="text" name="user" lay-verify="required|email"
                                lay-reqText="账户不能为空！" placeholder="" autocomplete="off" lay-verType="tips"
                                class="layui-input"></div>
                    </div>
                    <div class="layui-form-item"><label class="layui-form-label">邮箱密码</label>
                        <div class="layui-input-block"><input type="text" name="pass" lay-verify="required"
                                lay-reqText="密码不能为空！" placeholder="" autocomplete="off" lay-verType="tips"
                                class="layui-input"></div>
                    </div>
                    <div class="layui-form-item"><label class="layui-form-label">收信邮箱</label>
                        <div class="layui-input-block"><input type="text" name="to" lay-verify="mail" lay-reqText=""
                                placeholder="不填默认为发信邮箱" autocomplete="off" lay-verType="tips" class="layui-input"></div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">邮件模板</label>
                        <div class="layui-input-block">
                            <textarea placeholder="" name="template" id="template" class="layui-textarea"
                                rows="7"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <div class="layui-col-xs8 layui-col-md6 layui-col-md-offset2"><button type="submit"
                                    class="layui-btn layui-btn-default layui-btn-fluid" lay-submit=""
                                    lay-filter="save_mail">修改</button>
                            </div>
                        </div>
                    </div>
                </form>
                <div style="padding: 10px; margin-left: 3%; font-size: 16px;"><a href="javascript:sendtest();"
                        id="touser" style="color:#5FB878;">[给
                        发送一封测试邮件]</a></div>
            </div>
        </div>
    </div>
</div>

<div class="layui-col-xs12 layui-col-sm8 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset2">
    <div class="layui-field-box">
        <div class="layui-card">
            <div class="layui-card-header">小提示</div>
            <div class="layui-card-body" style="padding: 20px;">
                <i class="layui-icon layui-icon-tips"></i>&nbsp;此功能为用户新增站点时给自己发邮件提醒以及发用户余量不足提醒用户的邮件。
                使用邮箱发信时，建议使用QQ邮箱，SMTP服务器smtp.qq.com，端口465或587，密码不是QQ密码也不是邮箱独立密码，是QQ邮箱设置界面生成的<a
                    href="https://service.mail.qq.com/cgi-bin/help?subtype=1&&no=1001256&&id=28"
                    target="_blank">授权码</a>。<br><br><span style="color:#FF5722; font-size: 18px;">邮箱模板通用变量</span><br>
                <span style="color:#5FB878;">
                    根本变量：<br>
                    [admin]&nbsp;[/admin]&nbsp;新增站点通知管理员模板<br>
                    [user]&nbsp;[/user]&nbsp;用户绑定邮箱模板<br>
                    [notice]&nbsp;[/notice]&nbsp;用户余额不足通知模板<br>
                    以上根本变量建议必填，系统将根据根本变量选择局部模板<br><br>
                    通用变量：<br>
                    [username]&nbsp;收信人名称(邮箱)<br>
                    [siteurl]&nbsp;本站域名<br>
                    [time]&nbsp;时间<br><br>
                    专用变量：<br>
                    [webname]&nbsp;新增站点名称<br>
                    [weburl]&nbsp;新增站点域名<br>
                    [appid]&nbsp;APPID<br>
                    [appkey]&nbsp;APPKEY<br>
                    [random]&nbsp;随机验证码<br>
                    [noticecontent]&nbsp;通知内容<br>
                    <br>以上基本变量如系统未使用将自动清除请放心填写，如需更多变量可联系作者
                </span>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use('set', layui.factory('set'));
</script>